# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=anjuta-extras
pkgver=3.26.0+4+gb876d84
pkgrel=1
pkgdesc="Anjuta Integrated Development Environment extra plugins"
arch=('x86_64')
license=('GPL')
depends=('anjuta')
makedepends=('intltool' 'itstool' git gnome-common)
url="http://www.anjuta.org/"
_commit=b876d8471853396e10e27a0056aa311d0ae535f7  # master
source=("git+https://git.gnome.org/browse/anjuta-extras#commit=$_commit")
options=('!emptydirs')
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^ANJUTA_EXTRA_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

check() {
  cd $pkgname
  make check
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
